import datetime

from sqlalchemy import Column, Integer, String, Float, DateTime, UniqueConstraint, ForeignKey

from QualityInspectionViolation.DbInit.mysqlDb import Base


class SecondShareRecording(Base):
    __tablename__ = 'second_share_recording'
    id = Column(Integer, primary_key=True)
    shareRecordingId = Column(Integer)
    recordingAddress = Column(String(100))
    adviserId = Column(Integer)
    adviserName = Column(String(32))
    createdAt = Column(DateTime, default=datetime.datetime.now)
    updatedAt = Column(DateTime, default=datetime.datetime.now)

    def insertSecondShareRecording(self, SecondShareRecording, session):
        session.add(SecondShareRecording)